package com.atguigu.gmall.item;

import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;

/*
 * @author MaShuaiHao
 * @date 2022/2/24 17:06
 */
public class demo {
    public static void main(String[] args) {
        int target = 9;
        int[] arry = {2,7,11,15};
        for (int i = 0; i < arry.length - 1; i++) {
            for (int j = 0; j < arry.length-1-i; j++) {
                if (arry[i] + arry[j] == target){
                    System.out.println("i"+i);
                    System.out.println("j"+j);
                }
            }
        }
    }

}

